<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>public/assets/css/h5/list.css">
<style>
.weui_btn_plain_default{background-color: #f96a92;color: #fff;border:none;}
</style>

<div class="detial" style="margin-top:0%; border-bottom:0px;">
    <p class="name">意见反馈</p>
    <p>
    <textarea class="weui_textarea" id="nr" onkeyup="tjzs()" placeholder="遇见了什么问题" rows="3"></textarea>
    <div class="weui_textarea_counter"><span id="evaluate_num">0</span>/200</div>
    </p>
</div>

<a href="javascript:void(0);" class="weui_btn weui_btn_plain_default" id='tijiao'>提交</a>

<script type="text/javascript">
$(document).ready(function(){
    $("#tijiao").bind("click",function(){
        var $content = $('.weui_textarea').val();
        if(typeof($content) == "undefined" || $content == ''){
            alert('请输入内容');
            return false;
        }
        window.location.href="/feedback/insertfeedback?&message="+$content;
    });
});

function tjzs(){
    var evaluate_num = 200;//字数限制
	var count = $("#nr").val().length; 
	if(count > evaluate_num){ 
		var nr = $("#nr").val().substring(0,evaluate_num); 
    	$("#nr").val(nr); 
    	count = evaluate_num; 
	} 
	$("#evaluate_num").html(count); 
}
</script>
